<?php

$apiDir='api';

return [
    'enablePrettyUrl' => true,//开启URL美化
    'showScriptName' => false,//禁用index.php文件
    'rules' => [
        "/article"=>'api/main/article_details',
        "{$apiDir}" => 'api/main/doc',
        "{$apiDir}/<controller:\w+>/<a:[a-z0-9]+>/<b:[a-z0-9]+>" => 'api/<controller>/<a>_<b>',
        "{$apiDir}/<controller:\w+>/<a:[a-z0-9]+>/<b:[a-z0-9]+>/<c:[a-z0-9]+>" => 'api/<controller>/<a>_<b>_<c>',
        "{$apiDir}/<controller:\w+>/<a:[a-z0-9]+>/<b:[a-z0-9]+>/<c:[a-z0-9]+>/<d:[a-z0-9]+>" => 'api/<controller>/<a>_<b>_<c>_<d>',
        "{$apiDir}/<controller:\w+>" => 'api/<controller>/index',
        "{$apiDir}/<controller:\w+>/<action:\w+>" => 'api/<controller>/<action>',
    ]
];
